package com.estar.integaration.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.estar.integaration.Mapper.UserMapper;
import com.estar.integaration.Service.IUserService;
import com.estar.integaration.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author YJL
 * @since 2021-11-18
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

  @Autowired
  UserMapper userMapper;
  /**
   * 功能： 拿到登录的账号密码
   * @param userName
   * @return
   */
  @Override
  public User findByUserName(String userName) {
    QueryWrapper wrapper = new QueryWrapper();
    wrapper.eq("user_name",userName);
    return userMapper.selectOne(wrapper);
  }
}
